<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../js/layui/css/layui.css" media="all">
    <style type="text/css">
        .layui-table-cell{height:40px;line-height:40px;}
    </style>
</head>
<body>
<table class="layui-hide" id="test" lay-filter="stu-table"></table>

<script src="../../js/layui/layui.js"></script>
<script src="../../js/layui/layui.all.js"></script>
<script src="../../js/token.js"></script>
<script src="../../js/config.js"></script>
<script>
    //url 传参
    function GetQueryString(name){
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var a = decodeURI(window.location.search);
        var r = a.substr(1).match(reg);//search,查询？后面的参数，并匹配正则
        if(r!=null)return  unescape(r[2]); return null;
    }

    layui.use('table', function() {
        var $ = layui.$;
        var table = layui.table;
        table.render({
            elem: '#test'
            , id: 'stu-table-id'//重载需要
            , url: HOST+'trail/getStaffStatisticsDetail'
            , title: '商户表'
            ,where:{"staffBh":GetQueryString("staff_bh"), "queryDate":GetQueryString("access_date")}
            ,cols: [[
                {type:'numbers', title: '序号'}
                ,{field:'staffName',align : 'center',width : 140,title: '员工姓名'}
                ,{field:'staffBh',align : 'center',width : 125,title: '员工编号'}
                ,{field:'wyName',align : 'center',width : 140, title: '物业名称'}
                ,{field:'busiName',align : 'center',width : 140, title: '商户名称'}
                ,{field:'busiBh',align : 'center',width : 125, title: '商户编号'}
                ,{field:'address',align : 'center', width : 200,title: '地址'}
                ,{field:'rdTime',width : 160,align : 'center', title: '入店时间'}
                ,{field:'cdTime',width : 160,align : 'center', title: '离店时间'}
            ]]
            , page: true
            , page: {
                curr: layui.data("business_statistics_detail_page").index
            },
            done: (res, curr, count) => {
                layui.data("business_statistics_detail_page", {
                    key: 'index',
                    value: curr
                });
            }
        });
    });
</script>
</body>
</html>